Optimal. Leaf size=61 \[ \frac{(a-b) \cot ^3(e+f x)}{3 f}-\frac{(a-b) \cot (e+f x)}{f}-x (a-b)-\frac{a \cot ^5(e+f x)}{5 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0456984, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3629, 12, 3473, 8} \[ \frac{(a-b) \cot ^3(e+f x)}{3 f}-\frac{(a-b) \cot (e+f x)}{f}-x (a-b)-\frac{a \cot ^5(e+f x)}{5 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3629
Rule 12
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=-\frac{a \cot ^5(e+f x)}{5 f}-\int (a-b) \cot ^4(e+f x) \, dx\\ &=-\frac{a \cot ^5(e+f x)}{5 f}-(a-b) \int \cot ^4(e+f x) \, dx\\ &=\frac{(a-b) \cot ^3(e+f x)}{3 f}-\frac{a \cot ^5(e+f x)}{5 f}-(-a+b) \int \cot ^2(e+f x) \, dx\\ &=-\frac{(a-b) \cot (e+f x)}{f}+\frac{(a-b) \cot ^3(e+f x)}{3 f}-\frac{a \cot ^5(e+f x)}{5 f}-(a-b) \int 1 \, dx\\ &=-(a-b) x-\frac{(a-b) \cot (e+f x)}{f}+\frac{(a-b) \cot ^3(e+f x)}{3 f}-\frac{a \cot ^5(e+f x)}{5 f}\\ \end{align*}
Mathematica [C] time = 0.0503916, size = 69, normalized size = 1.13 \[ -\frac{a \cot ^5(e+f x) \text{Hypergeometric2F1}\left (-\frac{5}{2},1,-\frac{3}{2},-\tan ^2(e+f x)\right )}{5 f}-\frac{b \cot ^3(e+f x) \text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},-\tan ^2(e+f x)\right )}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.042, size = 67, normalized size = 1.1 \begin{align*}{\frac{1}{f} \left ( b \left ( -{\frac{ \left ( \cot \left ( fx+e \right ) \right ) ^{3}}{3}}+\cot \left ( fx+e \right ) +fx+e \right ) +a \left ( -{\frac{ \left ( \cot \left ( fx+e \right ) \right ) ^{5}}{5}}+{\frac{ \left ( \cot \left ( fx+e \right ) \right ) ^{3}}{3}}-\cot \left ( fx+e \right ) -fx-e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.67998, size = 82, normalized size = 1.34 \begin{align*} -\frac{15 \,{\left (f x + e\right )}{\left (a - b\right )} + \frac{15 \,{\left (a - b\right )} \tan \left (f x + e\right )^{4} - 5 \,{\left (a - b\right )} \tan \left (f x + e\right )^{2} + 3 \, a}{\tan \left (f x + e\right )^{5}}}{15 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.08593, size = 161, normalized size = 2.64 \begin{align*} -\frac{15 \,{\left (a - b\right )} f x \tan \left (f x + e\right )^{5} + 15 \,{\left (a - b\right )} \tan \left (f x + e\right )^{4} - 5 \,{\left (a - b\right )} \tan \left (f x + e\right )^{2} + 3 \, a}{15 \, f \tan \left (f x + e\right )^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 18.2639, size = 97, normalized size = 1.59 \begin{align*} \begin{cases} \tilde{\infty } a x & \text{for}\: \left (e = 0 \vee e = - f x\right ) \wedge \left (e = - f x \vee f = 0\right ) \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \cot ^{6}{\left (e \right )} & \text{for}\: f = 0 \\- a x - \frac{a}{f \tan{\left (e + f x \right )}} + \frac{a}{3 f \tan ^{3}{\left (e + f x \right )}} - \frac{a}{5 f \tan ^{5}{\left (e + f x \right )}} + b x + \frac{b}{f \tan{\left (e + f x \right )}} - \frac{b}{3 f \tan ^{3}{\left (e + f x \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.34912, size = 227, normalized size = 3.72 \begin{align*} \frac{3 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} - 35 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 20 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 480 \,{\left (f x + e\right )}{\left (a - b\right )} + 330 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 300 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \frac{330 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 300 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 35 \, a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 20 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 3 \, a}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5}}}{480 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]